package org.eiahe.hr.attendance.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.time.LocalDateTime;

/**
 * 请假审批事件
 *
 * @author zhangnn
 */
@Getter
public class LeaveApprovalEvent extends ApplicationEvent {

    /**
     * 请假申请ID
     */
    private final Long applicationId;

    /**
     * 员工工号
     */
    private final String employeeNo;

    /**
     * 用户ID
     */
    private final Long userId;

    /**
     * 请假开始时间
     */
    private final LocalDateTime startTime;

    /**
     * 请假结束时间
     */
    private final LocalDateTime endTime;

    /**
     * 请假类型
     */
    private final String leaveType;

    /**
     * 审批状态(3-已通过)
     */
    private final String approvalStatus;

    public LeaveApprovalEvent(Object source, Long applicationId, String employeeNo, Long userId,
            LocalDateTime startTime, LocalDateTime endTime, String leaveType, String approvalStatus) {
        super(source);
        this.applicationId = applicationId;
        this.employeeNo = employeeNo;
        this.userId = userId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.leaveType = leaveType;
        this.approvalStatus = approvalStatus;
    }
}
